-- GENERATED SPELL FOR [Dragonmaw Wind Reaver] --


function spell0_23330(pUnit, Event) --@Doom Bolt,n/a--
pUnit:FullCastSpellOnTarget(40876,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23330', 1500, 1)
end

function spell1_23330(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(40877,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23330', 5000, 1)
end

function spell2_23330(pUnit, Event) --@Freeze,n/a--
pUnit:FullCastSpellOnTarget(40875,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23330', 10000, 1)
end

function Sorts_23330(pUnit, Event)
local choix_sorts_23330 = math.random(0, 2)
if choix_sorts_23330 == 0 then
pUnit:RegisterEvent('spell0_23330', 1, 1)
end
if choix_sorts_23330 == 1 then
pUnit:RegisterEvent('spell1_23330', 1, 1)
end
if choix_sorts_23330 == 2 then
pUnit:RegisterEvent('spell2_23330', 1, 1)
end
end

function mob23330_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23330', math.random(1500, 3000), 1)
end

function mob23330_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23330_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23330_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23330, 1, 'mob23330_Action')
RegisterUnitEvent(23330, 2, 'mob23330_Leave')
RegisterUnitEvent(23330, 3, 'mob23330_Kill')
RegisterUnitEvent(23330, 4, 'mob23330_Die')
